package com.anuyun.ms.base.iEnum;

import com.anuyun.ms.base.common.BusinessException;

public enum SexEnum implements I18nEnum{
	female("女","female"), male("男","male");

	SexEnum(String nameCN,String nameEN) {
		this.nameCN = nameCN;
	}


	private String nameCN;
	
	private String nameEN;



	public String getNameCN() {
		return nameCN;
	}

	public void setNameCN(String nameCN) {
		this.nameCN = nameCN;
	}
	
	public String getNameEN() {
		return nameEN;
	}

	public void setNameEN(String nameEN) {
		this.nameEN = nameEN;
	}

	public String getValue(int ordinal) {
		for (SexEnum s : values()) {
			if (s.ordinal() == ordinal) {
				return s.getNameCN();
			}
		}
		return null;
	}

	public static void main(String[] s) {
		System.out.println(SexEnum.female.name());
		System.out.println(SexEnum.female.ordinal());
		System.out.println(SexEnum.female.getNameCN());
		
		throw new BusinessException(SexEnum.female);
	}

}
